<template>
  <div class="xxbgDetail con-layout">
    <my-bread title="信息变更查询" :goback="true"></my-bread>
    <div class="sydezxDetail-content">
      <van-list v-model="loading" :finished="finished" finished-text="没有更多了" @load="onLoad">
        <div class="list-item" v-for="item in list" :key="item.sjhm">
          <div class="list-top">
            <div class="top-name">
              <span class="name">办理时间：{{item.czsj}}</span>
              <span
                class="bl"
                :class="{'red':item.sfbdtg!= '1'}"
              >{{item.sfbdtg == ''?'办理中': item.sfbdtg== '0' ? '办理失败' : '办理成功'}}</span>
            </div>
            <div class="top-item" v-if="item.bdbtgyy">
              <span>变更失败原因：</span>
              <p>{{item.bdbtgyy}}</p>
            </div>
            <div class="top-item" v-if="item.whcdZH">
              <span>文化程度：</span>
              <p>{{item.whcdZH}}</p>
            </div>
            <div class="top-item top-item-bor" v-if="item.sjhm">
              <span>手机号码：</span>
              <p>{{item.sjhm}}</p>
            </div>

            <div class="top-item" v-if="item.hjxzqhZH">
              <span>户籍地：</span>
              <p>{{item.hjxzqhZH}}</p>
            </div>
            <div class="top-item" v-if="item.hjxxdz">
              <span>户籍详细地址：</span>
              <p>{{item.hjxxdz}}</p>
            </div>
            <div class="top-item" v-if="item.czdxzqhZH">
              <span>常住地：</span>
              <p>{{item.czdxzqhZH}}</p>
            </div>
            <div class="top-item" v-if="item.czdxxdz">
              <span>常住地详细地址：</span>
              <p>{{item.czdxxdz}}</p>
            </div>
            <div class="top-item" v-if="item.czdxxdz">
              <span>常住地详细地址：</span>
              <p>{{item.czdxxdz}}</p>
            </div>
            <div class="top-item" v-if="item.fwjgZH">
              <span>服务机构:</span>
              <p>{{item.fwjgZH}}</p>
            </div>
          </div>
        </div>
      </van-list>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      list: [],
      pageNum: 1,
      pageSize: 10,
      loading: false,
      finished: false
    };
  },
  methods: {
    onLoad() {
      this.$http({
        url: "/jysydj/xxbg/bgjlcx",
        method: "get",
        params: {
          pagenum: this.pageNum,
          pagesize: this.pageSize
        }
      }).then(res => {
        // 加载状态结束
        this.loading = false;
        this.finished = false;
        let data = res.returnData;
        if (+data.executeResult == 1) {
          this.pageNum++;
          if (data.bgjl) {
            this.list.push(...data.bgjl);
          }
          if (this.pageNum > res.pageCount) {
            this.finished = true;
            // 数据加载完毕
          }
        } else {
          this.sildeShow = false;
          this.finished = true;
          return false;
        }
      });
    }
  }
};
</script>

<style lang="scss" scoped>
.sydezxDetail-content {
  padding: 33px;
  box-sizing: border-box;
  .list-item {
    background-color: #ffffff;
    border-radius: 14px;
    box-shadow: 0px 3px 13px 0px rgba(8, 8, 61, 0.1);
    padding: 33px 33px 27px 33px;
    margin-top: 21px;
    box-sizing: border-box;
    .list-top {
      // border-bottom: 1px dashed #dbdbdb;
      .top-name {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 33px;
        .bl {
          font-size: 28px;
          font-weight: 500;
          color: #06a8f6;
          letter-spacing: 1px;
        }
        .yellow {
          color: #ff9800;
        }
        .red {
          color: #f44336;
        }
      }
      .top-item-bor {
        border-bottom: 1px dashed #dbdbdb;
        padding-bottom: 20px;
        box-sizing:border-box;
      }
      .top-item {
        display: flex;
        align-items: baseline;
        justify-content: flex-start;
        font-size: 25px;
        color: #333333;
        margin-bottom: 21px;
        span {
          width: 0 0 auto;
        }
        p {
          flex: 1;
          color: #333333;
          font-size: 25px;
          line-height: 35px;
        }
      }
    }
    .list-bottom {
      margin-top: 19px;
      .bottom-item {
        font-size: 25px;
        display: flex;
        align-items: baseline;
        justify-content: flex-start;
        span {
          width: 0 0 auto;
        }
        p {
          flex: 1;
          color: #333333;
          font-size: 25px;
          line-height: 35px;
        }
      }
    }
  }
}
</style>
